/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bigo.lib;

import bigo.data.MatrixMeta;
import bigo.data.Vector;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.lib.output.SequenceFileOutputFormat;

/**
 *
 * @author songliu
 */
public class BinaryMatrixOutputFormat extends
        SequenceFileOutputFormat<IntWritable, Vector.Wrapper>{
    public static void setOutputMatrix(Job job, MatrixMeta meta){
        job.getConfiguration().set(meta.path, meta.toString());
        setOutputPath(job, new Path(meta.path));
    }

}
